﻿<script setup lang="ts">
// import CpCount from '@/components/CpCount.vue'
import CpCount2 from '@/components/CpCount2.vue'
import { ref } from 'vue'

const count = ref(0)
const sum= ref(10)
const money= ref(100)
</script>

<template>
  <div class="user-page">user
      <!-- 结论： vue3中v-model 等价 :modelValue + @update:modelValue -->
    <CpCount
      v-model="count"
    >
    </CpCount>
    <CpCount :model-value="sum" @update:model-value="sum=$event"></CpCount>
    <!-- <CpCount2 :xxx="money" @update:xxx="money = $event"></CpCount2> -->
    <CpCount2 v-model:xxx="money"></CpCount2>
  </div>
  
</template>

<style lang="scss" scoped></style>